package com.gree.changying.server.network.upload;

import java.util.UUID;

/**
 * Create by 游德禄 on 2019-10-18
 * 用于上传文件的类 可以把原来的文件地址（String filepath）改为使用此类
 * 也可以继承此类来用
 */
public class UploadFile {
    //唯一ID 自动生成
    private String id;
    //文件类型 用于区分不同类型的文件
    private int type;
    //父位置
    private int parent ;
    //不同类型的文件 所在的位置
    private int position;
    private int group;//所在组
    //本地路径
    private String filePath;
    //上传成功的地址(当已上传图片，只需将路径设置此值，filePath为空，上传时会过滤此图)
    private String url;
    //标题
    private String title;


    private String temp1;
    private String temp2;
    private String temp3;
    private String remark ;
    private String tempId;

    public int getGroup() {
        return group;
    }

    public void setGroup(int group) {
        this.group = group;
    }

    public String getTempId() {
        return tempId;
    }

    public void setTempId(String tempId) {
        this.tempId = tempId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getTemp1() {
        return temp1;
    }

    public void setTemp1(String temp1) {
        this.temp1 = temp1;
    }

    public String getTemp2() {
        return temp2;
    }

    public void setTemp2(String temp2) {
        this.temp2 = temp2;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public UploadFile(String filePath){
        setFilePath(filePath);
    }
    public static UploadFile file(String filePath){
        return new UploadFile(filePath);
    }

    public String getFilePath() {
        return filePath;
    }

    public String getId() {
        return id;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
        this.id = UUID.randomUUID().toString();
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public int getParent() {
        return parent;
    }

    public void setParent(int parent) {
        this.parent = parent;
    }

    public String getTemp3() {
        return temp3;
    }

    public void setTemp3(String temp3) {
        this.temp3 = temp3;
    }
}
